export let http={
    
    get:function (url) {
        return fetch(url,{
            method:"get",
            credentials:"include"
        });
    },

    post:function (url,obj) {

        let urlStr=new URLSearchParams();


        if(obj){
            for(let p in obj){
                urlStr.append(p,obj[p]);
            }
        }

        return fetch(url,{
            method:"post",
            credentials:"include",
            body:urlStr
        });

    }
    

};